import React, { FC } from 'react';
import { Tabs } from 'choerodon-ui/pro';
import { TabsType } from 'choerodon-ui/lib/tabs/enum';

const { TabPane } = Tabs;

export interface TabsCardProps {}

type TabItem = {
  title: string;
  key: string;
  content: string;
}

const TabsCard: FC<TabsCardProps> = () => {
  const tabs = ([
    {title: 'Tab1', key: '1', content: 'Tab Content 1'},
    {title: 'Tab2', key: '2', content: 'Tab Content 2'},
    {title: 'Tab3', key: '3', content: 'Tab Content 3'},
  ]);
  return (
    <Tabs defaultActiveKey="2" type={TabsType.card}>
      {
        tabs.map((tab: TabItem) => <TabPane tab={tab.title} key={tab.key}>{tab.content}</TabPane>)
      }
    </Tabs>
  );
};

export default TabsCard;
